import { useCallback } from 'react';
import useBasisCash from './useBasisCash';
import useHandleTransactionReceipt from './useHandleTransactionReceipt';

const useHarvestFromBoardroom = (v: boolean) => {
  const basisCash = useBasisCash();
  const handleTransactionReceipt = useHandleTransactionReceipt();

  const handleReward = useCallback(() => {
    handleTransactionReceipt(basisCash.harvestCashFromBoardroom(v), 'Claim s' + basisCash.config.group.toUpperCase() + ' from Boardroom');
  }, [basisCash]);

  return { onReward: handleReward };
};

export default useHarvestFromBoardroom;
